<html>
<head><meta charset="utf-8"><title>Add configure flag to build clang · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Add.20configure.20flag.20to.20build.20clang.html">Add configure flag to build clang</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="246177972"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Add%20configure%20flag%20to%20build%20clang/near/246177972" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manuel Drehwald <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Add.20configure.20flag.20to.20build.20clang.html#246177972">(Jul 16 2021 at 02:16)</a>:</h4>
<p>The tarballs which we offer here: <a href="https://forge.rust-lang.org/infra/other-installation-methods.html">https://forge.rust-lang.org/infra/other-installation-methods.html</a><br>
already includes the clang project inside of llvm-project.<br>
I would like to build it along with the rust project, to make sure that my rustc and clang are based on the same llvm version.<br>
Of course i can just manually build it after building rust, but it would be nice if we can configure the build process to also build clang (as we can for lld right now).<br>
Is there a strong reason to not allow building it with our tools?</p>



<a name="246179872"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Add%20configure%20flag%20to%20build%20clang/near/246179872" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Add.20configure.20flag.20to.20build.20clang.html#246179872">(Jul 16 2021 at 03:00)</a>:</h4>
<p><span class="user-mention" data-user-id="348574">@Manuel Drehwald</span> I'd like to see that as well. We already ship <code>llvm-tools-preview</code>; I'd love to also ship the clang frontend.</p>



<a name="246180286"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Add%20configure%20flag%20to%20build%20clang/near/246180286" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manuel Drehwald <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Add.20configure.20flag.20to.20build.20clang.html#246180286">(Jul 16 2021 at 03:11)</a>:</h4>
<p>Well that's what I was hoping for.<br>
I guess it should be sufficient if I just search for the locations where lld is mentioned and add clang?<br>
I'll figure out the details / test it in a few days so that it should be ready in time for the next release round.</p>



<a name="246180713"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Add%20configure%20flag%20to%20build%20clang/near/246180713" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Add.20configure.20flag.20to.20build.20clang.html#246180713">(Jul 16 2021 at 03:20)</a>:</h4>
<p>I don't think it's that simple; I'm not sure we should "just" start shipping clang. Landing support for it in tree might be ok, though I wouldn't want to maintain it if we're not actively using it if it's anything complex or error prone.</p>
<p>If we want to start shipping clang, even in a preview capacity, I think there likely needs to be some discussion about the motivations and tradeoffs, including what it means for our overall product / stability, etc. The tools we ship today are much less of a commitment/useful thing than a full compiler.</p>



<a name="246181335"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Add%20configure%20flag%20to%20build%20clang/near/246181335" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manuel Drehwald <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Add.20configure.20flag.20to.20build.20clang.html#246181335">(Jul 16 2021 at 03:35)</a>:</h4>
<p>That sounds to me like we are talking about two different things.  <span class="user-mention" data-user-id="116122">@simulacrum</span> <br>
Everything required to build clang is already in the tarball, so we don't have to start shipping it. <br>
All I suggest is simplifying the build process for those who want to manually build clang.</p>
<p>During the last days I used x(.py) and ./configure to set up most of the rust related config and build rust. <br>
Afterwards I used cmake / ninja directly to build clang. <br>
All that I suggest is adding an extra flag to ./configure.<br>
Right now we have <br>
--enable-lld   \\     build lld<br>
so I would like to add <br>
--enable-clang  \\ build clang</p>
<p>To me those flags are hidden enough to not cause any kind of issues to normal rust users and don't require any commitment.<br>
It would probably only be used to simplify life for people working close to the compiler and make their life a little bit nicer.<br>
I would use it related to Enzyme which already has quite a few tests. Since I'm just setting up a pipeline for automatic building / testing I would also notice issues quite fast.</p>



<a name="246181428"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Add%20configure%20flag%20to%20build%20clang/near/246181428" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Add.20configure.20flag.20to.20build.20clang.html#246181428">(Jul 16 2021 at 03:37)</a>:</h4>
<p>That seems like a pretty reasonable start.</p>



<a name="246182072"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Add%20configure%20flag%20to%20build%20clang/near/246182072" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Add.20configure.20flag.20to.20build.20clang.html#246182072">(Jul 16 2021 at 03:51)</a>:</h4>
<p>If the changes to our build system are minimal, it's probably ok, but otherwise I wouldn't want to land them.</p>



<a name="246182603"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Add%20configure%20flag%20to%20build%20clang/near/246182603" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manuel Drehwald <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Add.20configure.20flag.20to.20build.20clang.html#246182603">(Jul 16 2021 at 04:02)</a>:</h4>
<p>Great, than I will go this way. I don't need a strong clang integration since enzyme seems to be too llvm specific to be integrated further into rustc.</p>



<a name="246187728"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Add%20configure%20flag%20to%20build%20clang/near/246187728" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Add.20configure.20flag.20to.20build.20clang.html#246187728">(Jul 16 2021 at 06:08)</a>:</h4>
<p>IIRC the way one used to build clang was to have it inside <code>tools</code> inside the LLVM build tree, idk how that works with <code>llvm-project</code> now - but I'm imagining it could have been (and still could be) as simple as adding a LLVM CMake flag?</p>



<a name="246236317"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Add%20configure%20flag%20to%20build%20clang/near/246236317" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Add.20configure.20flag.20to.20build.20clang.html#246236317">(Jul 16 2021 at 15:10)</a>:</h4>
<p>Its just a single cmake flag AFAIK.</p>



<a name="246236374"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Add%20configure%20flag%20to%20build%20clang/near/246236374" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Add.20configure.20flag.20to.20build.20clang.html#246236374">(Jul 16 2021 at 15:11)</a>:</h4>
<div class="codehilite"><pre><span></span><code>-DLLVM_ENABLE_PROJECTS=&quot;clang&quot;
</code></pre></div>



<a name="246240321"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Add%20configure%20flag%20to%20build%20clang/near/246240321" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Add.20configure.20flag.20to.20build.20clang.html#246240321">(Jul 16 2021 at 15:43)</a>:</h4>
<p>if it is just that, is it possible to add general <code>LLVM_ENABLE_PROJECTS</code> support to <code>config.toml</code>?</p>



<a name="246240476"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Add%20configure%20flag%20to%20build%20clang/near/246240476" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Add.20configure.20flag.20to.20build.20clang.html#246240476">(Jul 16 2021 at 15:44)</a>:</h4>
<p>something something maybe someone wants to do 3-way xLTO between Rust (rustc), C++ (clang) and Fortran (flang) :P</p>



<a name="246324607"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Add%20configure%20flag%20to%20build%20clang/near/246324607" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manuel Drehwald <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Add.20configure.20flag.20to.20build.20clang.html#246324607">(Jul 17 2021 at 13:18)</a>:</h4>
<p>Good hint, I think I could even have such a case, since Enzyme works for all three and Fortran could show up in some math dependencies. <br>
However, I think we don't ship flang and I'm not sure what to do (download/search/require-path).<br>
To be safe I just created a simple pr only for compiling the existing clang project.</p>



<a name="246366388"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Add%20configure%20flag%20to%20build%20clang/near/246366388" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Add.20configure.20flag.20to.20build.20clang.html#246366388">(Jul 18 2021 at 08:19)</a>:</h4>
<p>what I'm thinking is a more general mechanism, if it can work at all, might be better for not implying that the clang build is "supported officially"</p>



<a name="246366391"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Add%20configure%20flag%20to%20build%20clang/near/246366391" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Add.20configure.20flag.20to.20build.20clang.html#246366391">(Jul 18 2021 at 08:19)</a>:</h4>
<p>if it's like a list you can put anything you want in</p>



<a name="246393672"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Add%20configure%20flag%20to%20build%20clang/near/246393672" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manuel Drehwald <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Add.20configure.20flag.20to.20build.20clang.html#246393672">(Jul 18 2021 at 19:14)</a>:</h4>
<p>Well if you not limit it to llvm-projects, but allow general llvm commands, I would also be fine with something like:<br>
--unstable-llvm-key-val=LLVM_ENABLE_PLUGINS=ON<br>
--unstable-llvm-key-val=LLVM_ENABLE_PROJECTS="clang;..."</p>
<p>I  made a small pro/con list and I really have no preference. I have two PR's ready for clang/plugins, but I could also write one to just forward unsupported wildcard flags if <span class="user-mention" data-user-id="116122">@simulacrum</span> feels like it's a smaller change.</p>



<a name="246394983"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Add%20configure%20flag%20to%20build%20clang/near/246394983" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Add.20configure.20flag.20to.20build.20clang.html#246394983">(Jul 18 2021 at 19:47)</a>:</h4>
<p>I think the more general mechanism is not a bad idea. It seems to go along better as a "if you don't want to build LLVM externally", though it is likely also to be "it" in the sense that I wouldn't expect us to try and do more than just pass the options through.</p>



<a name="246395144"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Add%20configure%20flag%20to%20build%20clang/near/246395144" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manuel Drehwald <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Add.20configure.20flag.20to.20build.20clang.html#246395144">(Jul 18 2021 at 19:51)</a>:</h4>
<p>Ok great. Then I will just close my PR and come back with the new approach.</p>



<a name="246396808"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Add%20configure%20flag%20to%20build%20clang/near/246396808" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Add.20configure.20flag.20to.20build.20clang.html#246396808">(Jul 18 2021 at 20:32)</a>:</h4>
<p>do we need special configure support? I would expect <code>config.toml</code> is enough, since there's <code>--set</code> or w/e it's called for <code>configure</code> to change arbitrary <code>config.toml</code> entries</p>



<a name="246397133"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Add%20configure%20flag%20to%20build%20clang/near/246397133" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Add.20configure.20flag.20to.20build.20clang.html#246397133">(Jul 18 2021 at 20:41)</a>:</h4>
<p>I wouldn't expect we would, no</p>



<a name="246412280"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Add%20configure%20flag%20to%20build%20clang/near/246412280" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manuel Drehwald <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Add.20configure.20flag.20to.20build.20clang.html#246412280">(Jul 19 2021 at 03:10)</a>:</h4>
<p>Are you sure about that?<br>
--set doesn't allow creating new entries. At least I couldn't find out how. <br>
Since I can't know what people will change the only solution would be adding a wildcard entry to the llvm section.<br>
Then people would need to do something like <code>--set=llvm.unstable="ENABLE_PLUGINS=ON;ENABLE_PROJECTS="clang;flang""</code><br>
(ignoring the exact layout of ",;).<br>
This would mean that arguments passed here would need to pass our as well as llvm's parsing.<br>
This looks messy / unnecessary error-prone to me.</p>
<p>How about having a new, empty section: [llvm-unstable]<br>
Then we can keep the design of "one change per command".<br>
A call to <code>--unstable-llvm-args=LLVM_ENABLE_PLUGINS=ON</code><br>
would then create (or overwrite if existing) the entry <code>ENABLE_PLUGINS=ON</code> in the section [llvm-unstable].<br>
Advantages: We can pass multiple args in multiple commands. It also makes obvious in which format we expect arguments.</p>



<a name="246412854"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Add%20configure%20flag%20to%20build%20clang/near/246412854" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Add.20configure.20flag.20to.20build.20clang.html#246412854">(Jul 19 2021 at 03:29)</a>:</h4>
<p>I was imagining <code>--set=llvm.enable-projects="clang;flang"</code> or something</p>



<a name="246414405"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Add%20configure%20flag%20to%20build%20clang/near/246414405" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manuel Drehwald <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Add.20configure.20flag.20to.20build.20clang.html#246414405">(Jul 19 2021 at 04:08)</a>:</h4>
<p>Are you aware that your set command will fail if you don't create a PR to add <code>enable-projects</code> to the llvm section of the config.toml.examples?</p>
<div class="codehilite" data-code-language="Bash"><pre><span></span><code> ./configure --set<span class="o">=</span>llvm.enable-projects<span class="o">=</span><span class="s2">"clang;flang"</span>
configure: processing <span class="nb">command</span> line
configure:
configure: llvm.enable-projects :<span class="o">=</span> clang<span class="p">;</span>flang
configure: build.configure-args :<span class="o">=</span> <span class="o">[</span><span class="s1">'--set=llvm.enable-projects=clang;flang'</span><span class="o">]</span>
Traceback <span class="o">(</span>most recent call last<span class="o">)</span>:
  File <span class="s2">"./src/bootstrap/configure.py"</span>, line <span class="m">461</span>, <span class="k">in</span> &lt;module&gt;
    configure_section<span class="o">(</span>sections<span class="o">[</span>section_key<span class="o">]</span>, section_config<span class="o">)</span>
  File <span class="s2">"./src/bootstrap/configure.py"</span>, line <span class="m">449</span>, <span class="k">in</span> configure_section
    raise RuntimeError<span class="o">(</span><span class="s2">"failed to find config line for {}"</span>.format<span class="o">(</span>key<span class="o">))</span>
RuntimeError: failed to find config line <span class="k">for</span> enable-projects
</code></pre></div>



<a name="246414484"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Add%20configure%20flag%20to%20build%20clang/near/246414484" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manuel Drehwald <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Add.20configure.20flag.20to.20build.20clang.html#246414484">(Jul 19 2021 at 04:11)</a>:</h4>
<p>I also would need another PR to add <code>enable-plugins</code> to the toml. We should keep in mind that each PR takes 6+ weeks to hit stable.<br>
So we would need to add logic to handle "leftover" llvm args which aren't explicitly handled and we would still need one PR for each new llvm argument. I don't think this is a relevant improvement wrt. the current situation.</p>



<a name="246427150"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Add%20configure%20flag%20to%20build%20clang/near/246427150" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Add.20configure.20flag.20to.20build.20clang.html#246427150">(Jul 19 2021 at 08:10)</a>:</h4>
<p>oh I was imagining having a key like my suggestion instead of a more specific e.g. <code>build-clang = true</code>. I can see why you may want something more general like <code>--set=llvm.extra-cmake-vars.ENABLE_PROJECTS="clang;flang"</code> - I guess the fact that <code>configure</code> relies on <code>config.toml.example</code> is annoying in terms of making it have nice UX</p>



<a name="246439049"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Add%20configure%20flag%20to%20build%20clang/near/246439049" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Add.20configure.20flag.20to.20build.20clang.html#246439049">(Jul 19 2021 at 10:34)</a>:</h4>
<p>configure does so in general, but I imagine it wouldn't be <em>that</em> hard to add a different mode of adding flags if desired</p>



<a name="246439138"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Add%20configure%20flag%20to%20build%20clang/near/246439138" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Add.20configure.20flag.20to.20build.20clang.html#246439138">(Jul 19 2021 at 10:35)</a>:</h4>
<p>I would say that it sounds like this'll be sufficiently complicated that maybe just adding the enable-clang and whatever other options you want to expose is easier.</p>



<a name="246534551"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Add%20configure%20flag%20to%20build%20clang/near/246534551" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manuel Drehwald <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Add.20configure.20flag.20to.20build.20clang.html#246534551">(Jul 20 2021 at 01:17)</a>:</h4>
<p>I got that you wanted something more general <span class="user-mention" data-user-id="119009">@eddyb</span> , I just wasn't sure how to handle your syntax before your last comment.<br>
Now it's more obvious to me how you had it in mind. But since I'm still not entirely sure about (if / how to) skip the toml file I would rather follow simulacrum's offer and implement my two flags in the classical way. Especially since I will probably need to write a more complex rustup PR too.</p>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> If you want me to adjust the configure text about the clang flag just let me know (or feel free to update it directly). <a href="https://github.com/rust-lang/rust/pull/87297">https://github.com/rust-lang/rust/pull/87297</a></p>



<a name="247273983"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Add%20configure%20flag%20to%20build%20clang/near/247273983" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manuel Drehwald <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Add.20configure.20flag.20to.20build.20clang.html#247273983">(Jul 26 2021 at 22:51)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> Not sure if this reminder ping isn't already too late since there is already a pre-release testing. <br>
But since I don't know the change policies for such cases and it's probably hard for a build flag to break anything not using them, I will still give it a try. Would you mind adding these two flags as discussed above? It would help us to have our build flags in the release tarballs earlier to be able to drop our custom solutions.</p>



<a name="247276193"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Add%20configure%20flag%20to%20build%20clang/near/247276193" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Add.20configure.20flag.20to.20build.20clang.html#247276193">(Jul 26 2021 at 23:21)</a>:</h4>
<p><span class="user-mention" data-user-id="348574">@Manuel Drehwald</span> what do you mean by too late? it's too late for backports to 1.55, but you can always make PRs to nightly</p>



<a name="247276231"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Add%20configure%20flag%20to%20build%20clang/near/247276231" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Add.20configure.20flag.20to.20build.20clang.html#247276231">(Jul 26 2021 at 23:22)</a>:</h4>
<p>and if you really need this you can apply a patch to your fork of rust</p>



<a name="247276485"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Add%20configure%20flag%20to%20build%20clang/near/247276485" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manuel Drehwald <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Add.20configure.20flag.20to.20build.20clang.html#247276485">(Jul 26 2021 at 23:25)</a>:</h4>
<p>Exactly, that's what I mean. Since I created this pr a week ago and it was quite small I was hoping that it will be merged before the current release train to become a part of the 1.55 stable release. But in this case I will wait another 6 weeks.</p>



<a name="247276552"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Add%20configure%20flag%20to%20build%20clang/near/247276552" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Add.20configure.20flag.20to.20build.20clang.html#247276552">(Jul 26 2021 at 23:26)</a>:</h4>
<p>a week before the release is already cutting it rather close</p>



<a name="247276866"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Add%20configure%20flag%20to%20build%20clang/near/247276866" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manuel Drehwald <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Add.20configure.20flag.20to.20build.20clang.html#247276866">(Jul 26 2021 at 23:31)</a>:</h4>
<p>That's stricter then what I expected, but then again there's nothing I could have done differently, so I guess that's fine.<br>
Thank you for explaining. :)</p>



<a name="247276899"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Add%20configure%20flag%20to%20build%20clang/near/247276899" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Add.20configure.20flag.20to.20build.20clang.html#247276899">(Jul 26 2021 at 23:31)</a>:</h4>
<p>the nice thing about releasing every 6 weeks is you don't have that long to wait :)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>